#include "setcolors.h"
#include "Manager.h"

setcolors::setcolors(QWidget *parent)
    : QDialog(parent)
{
	ui.setupUi(this);	
	
	ui.listWidget->addItems(Manager::pantone);
	
	connect(ui.pushButton, SIGNAL(clicked()), this, SLOT(AddFrontColor()));
	connect(ui.pushButton_2, SIGNAL(clicked()), this, SLOT(AddBackColor()));	
}

setcolors::~setcolors()
{

}

void setcolors::AddFrontColor()
{
	ui.listWidget->setFocus();
	QListWidgetItem* item = ui.listWidget->currentItem();
	QString color = item->text();
	ui.listWidget_2->addItem(color);
}

void setcolors::AddBackColor()
{
	ui.listWidget->setFocus();
	QListWidgetItem* item = ui.listWidget->currentItem();
	QString color = item->text();
	ui.listWidget_5->addItem(color);
}